import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class loginpage extends HttpServlet {
    @Override
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
String name,password;
name = (String) request.getParameter("username");
password = (String)request.getParameter("password");
System.out.println("username : "+name);
 out.println("<html>");
            out.println("<head>");
            out.println("<title>Servlet login</title>");  
            out.println("</head>");
            out.println("<body>");
            out.println("<h1>Servlet login at " + request.getContextPath () + "</h1>");
            out.println("username:"+name+"\npassword : "+password);
            out.println("</body>");
            out.println("</html>");
           
}
}